<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich" 
    xmlns:a4j="http://richfaces.org/a4j"
    template="/layout/template.xhtml">

<ui:define name="body">

    <h:form id="paymentForm">
    
        <rich:panel>

            <div class="dialog">
            	<h2>You have selected following books:</h2>
            	<ui:repeat var="book" value="#{selectedBooks}">
            		<h1><h:outputText value="#{book.bookName.concat(',')}" /></h1>
            	</ui:repeat>
            	<br />
            	<h2>Total price is:</h2>
            	<h1><h:outputText value="#{totalPrice}" /></h1>
            	<br />
            	<h2>Your address is:</h2>
            	<h1><h:outputText value="#{address}" /></h1>
            	<br />
            	<h2>Your payment is:</h2>
            	<h1><h:outputText value="#{payment}" /></h1>
            	<br />
            	<a4j:region rendered="#{payment.equals('e-bank')}">
            	<h2>E-Bank is:</h2>
            	<h1><h:outputText value="#{bank}" /></h1>
            	</a4j:region>
            </div>

        </rich:panel>

        <div class="actionButtons">
            <h:commandButton id="submit" value="Submit" 
            	action="#{bookMaintain.confirmAndPay()}"/>
            <h:commandButton id="cancel" value="Cancel" 
            	action="#{bookMaintain.cancel()}"/>
        </div>

    </h:form>

 </ui:define>
</ui:composition>
